package com.bizhibihui.ordermeal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.bizhibihui.ordermeal.entity.BizFood;
import com.bizhibihui.ordermeal.vo.FoodConditionVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 */
public interface BizFoodMapper extends BaseMapper<BizFood> {

    /**
     * 分页查询
     *
     * @param page
     * @param vo
     * @return
     */
    List<BizFood> findByCondition(@Param("page") IPage<BizFood> page, @Param("vo") FoodConditionVo vo);

    /**
     * 统计指定的标签集合
     *
     * @param list
     * @return
     */
    List<BizFood> listTagsByFoodId(List<Integer> list);

    /**
     * 获取详情
     *
     * @param id
     * @return
     */
    BizFood getById(Integer id);

    /**
     * 批量删除
     *
     * @param ids
     * @return
     */
    int deleteBatch(Integer[] ids);


    List<BizFood> getFoodByOrder(@Param("orderId") Integer orderId);
}
